package com.gaohe.hotal.service.impl;

import java.util.List;
import com.gaohe.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gaohe.hotal.mapper.HotEmployeeTurnMapper;
import com.gaohe.hotal.domain.HotEmployeeTurn;
import com.gaohe.hotal.service.IHotEmployeeTurnService;

/**
 * 员工日轮班Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-02
 */
@Service
public class HotEmployeeTurnServiceImpl implements IHotEmployeeTurnService 
{
    @Autowired
    private HotEmployeeTurnMapper hotEmployeeTurnMapper;

    /**
     * 查询员工日轮班
     * 
     * @param turnId 员工日轮班主键
     * @return 员工日轮班
     */
    @Override
    public HotEmployeeTurn selectHotEmployeeTurnByTurnId(Long turnId)
    {
        return hotEmployeeTurnMapper.selectHotEmployeeTurnByTurnId(turnId);
    }

    /**
     * 查询员工日轮班列表
     * 
     * @param hotEmployeeTurn 员工日轮班
     * @return 员工日轮班
     */
    @Override
    public List<HotEmployeeTurn> selectHotEmployeeTurnList(HotEmployeeTurn hotEmployeeTurn)
    {
        return hotEmployeeTurnMapper.selectHotEmployeeTurnList(hotEmployeeTurn);
    }

    /**
     * 新增员工日轮班
     * 
     * @param hotEmployeeTurn 员工日轮班
     * @return 结果
     */
    @Override
    public int insertHotEmployeeTurn(HotEmployeeTurn hotEmployeeTurn)
    {
        hotEmployeeTurn.setCreateTime(DateUtils.getNowDate());
        return hotEmployeeTurnMapper.insertHotEmployeeTurn(hotEmployeeTurn);
    }

    /**
     * 修改员工日轮班
     * 
     * @param hotEmployeeTurn 员工日轮班
     * @return 结果
     */
    @Override
    public int updateHotEmployeeTurn(HotEmployeeTurn hotEmployeeTurn)
    {
        hotEmployeeTurn.setUpdateTime(DateUtils.getNowDate());
        return hotEmployeeTurnMapper.updateHotEmployeeTurn(hotEmployeeTurn);
    }

    /**
     * 批量删除员工日轮班
     * 
     * @param turnIds 需要删除的员工日轮班主键
     * @return 结果
     */
    @Override
    public int deleteHotEmployeeTurnByTurnIds(Long[] turnIds)
    {
        return hotEmployeeTurnMapper.deleteHotEmployeeTurnByTurnIds(turnIds);
    }

    /**
     * 删除员工日轮班信息
     * 
     * @param turnId 员工日轮班主键
     * @return 结果
     */
    @Override
    public int deleteHotEmployeeTurnByTurnId(Long turnId)
    {
        return hotEmployeeTurnMapper.deleteHotEmployeeTurnByTurnId(turnId);
    }
}
